<?php

namespace GamesBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @author  coffey  <coffey@nligo.com>
 * Games
 *
 * 游戏表
 * @ORM\Table(name="games")
 * @ORM\Entity(repositoryClass="GamesBundle\Repository\GamesRepository")
 * @ORM\HasLifecycleCallbacks()
 */
class Games
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false,options={"comment":"游戏自增id"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="game_name", type="string", length=50, nullable=false,options={"comment":"游戏名称"})
     */
    private $gameName = '';

    /**
     * @var integer
     *
     * @ORM\Column(name="status", type="integer", nullable=false,options={"comment":"游戏状态 0为启用 1为禁用 默认启用"})
     */
    private $status = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="is_del", type="integer", nullable=false,options={"comment":"是否删除 0为正常 1为删除"})
     */
    private $isDel = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="game_desc", type="string", length=255, nullable=false,options={"comment":"游戏描述"})
     */
    private $gameDesc = '';

    /**
     * @var string
     *
     * @ORM\Column(name="game_pic", type="string", length=255, nullable=false,options={"comment":"游戏封面图"})
     */
    private $gamePic = '';

    /**
     * @var integer
     *
     * @ORM\Column(name="create_at", type="integer", nullable=false,options={"comment":"创建时间"})
     */
    private $createAt = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="update_at", type="integer", nullable=false,options={"comment":"更新时间"})
     */
    private $updateAt = '0';

    /**
     * @ORM\PrePersist
     */
    public function PrePersist(){
        $this->setCreateAt(time());
        $this->setUpdateAt(time());
    }

    /**
     * @ORM\PreUpdate
     */
    public function PreUpdate(){
        $this->setCreateAt(time());
    }


    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set gameName
     *
     * @param string $gameName
     *
     * @return Games
     */
    public function setGameName($gameName)
    {
        $this->gameName = $gameName;

        return $this;
    }

    /**
     * Get gameName
     *
     * @return string
     */
    public function getGameName()
    {
        return $this->gameName;
    }

    /**
     * Set status
     *
     * @param integer $status
     *
     * @return Games
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return integer
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set isDel
     *
     * @param integer $isDel
     *
     * @return Games
     */
    public function setIsDel($isDel)
    {
        $this->isDel = $isDel;

        return $this;
    }

    /**
     * Get isDel
     *
     * @return integer
     */
    public function getIsDel()
    {
        return $this->isDel;
    }

    /**
     * Set gameDesc
     *
     * @param string $gameDesc
     *
     * @return Games
     */
    public function setGameDesc($gameDesc)
    {
        $this->gameDesc = $gameDesc;

        return $this;
    }

    /**
     * Get gameDesc
     *
     * @return string
     */
    public function getGameDesc()
    {
        return $this->gameDesc;
    }

    /**
     * Set gamePic
     *
     * @param string $gamePic
     *
     * @return Games
     */
    public function setGamePic($gamePic)
    {
        $this->gamePic = $gamePic;

        return $this;
    }

    /**
     * Get gamePic
     *
     * @return string
     */
    public function getGamePic()
    {
        return $this->gamePic;
    }

    /**
     * Set createAt
     *
     * @param integer $createAt
     *
     * @return Games
     */
    public function setCreateAt($createAt)
    {
        $this->createAt = $createAt;

        return $this;
    }

    /**
     * Get createAt
     *
     * @return integer
     */
    public function getCreateAt()
    {
        return $this->createAt;
    }

    /**
     * Set updateAt
     *
     * @param integer $updateAt
     *
     * @return Games
     */
    public function setUpdateAt($updateAt)
    {
        $this->updateAt = $updateAt;

        return $this;
    }

    /**
     * Get updateAt
     *
     * @return integer
     */
    public function getUpdateAt()
    {
        return $this->updateAt;
    }
}
